<?php
/**
 * 系統名稱: Lotto 系統
 * 檔案說明: 專案管理-修改
 * $Author$
 * $Id$
 *
 */

//取出此期賽程
if(is_array($_arrGamble))list($intGID, $arrGamble) = each($_arrGamble);
if(empty($intGID)){
	$arrGamble = getNewGambleData($intLottoID, 0);
	if($arrGamble === false){
		ErrMsgOutputHTML("Error", "", 1);
	}
	if(sizeof($arrGamble) == 0){
		$arrGamble = getNewGambleData($intLottoID, 1);
		if($arrGamble === false){
			ErrMsgOutputHTML("Error", "", 1);
		}
	}
	$intGID = $arrGamble["ID"];
}

if(!empty($intGID))$_strGDate = DateForm($arrGamble["GameDate"], $arrGamble["GameTime"], "Y-m-d", "UToC")."&nbsp;".TimeForm($arrGamble["GameDate"], $arrGamble["GameTime"], "h:i a", "UToC");

$arrTmp = split("-", $arrLotto["Number"]);
for($i = intval($arrTmp[0]); $i <= intval($arrTmp[1]); $i++)$_strNumber .= $i.",";
$_strNumber = substr($_strNumber, 0, strlen($_strNumber) - 1);
?><!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title> <?php print $_strRealBet7S["Title"];?> (Add) </title>
<link rel="stylesheet" href="../../css/backend.css?time=01" type="text/css">
<script language="JavaScript1.2" type="text/javascript" src="/inc/RealBetTemp7Star<?php print $_intLang?>.js?time=01"></script>
<script language="JavaScript">
<!--
var Game1 = new Array(), Game2 = new Array(), Game3 = new Array(), Game4 = new Array(), Game5 = new Array(), Game6 = new Array();
var Game7 = new Array(), Game8 = new Array(), Game9 = new Array(), Game10 = new Array();
var Game11 = new Array();
var Game12 = new Array(), Game13 = new Array();
var Game14 = new Array(), Game15 = new Array(), Game16 = new Array(), Game17 = new Array();
var Game18 = new Array(), Game19 = new Array(), Game20 = new Array(), Game21 = new Array(), Game22 = new Array();
//var strGameTime = "<?php print $_strGDate;?>";
//var strGameNo = "<?php print $arrGamble["SerialNo"];?>";
var intSortPlus = -1;
var arrSpecialNum = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
var arrSpecialCon = new Array("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "");
var strLottoID = "<?php print $intLottoID;?>";
var strBetType = "14,15,18,19,20,21,22";
var RSeconds = 0;
var AutoRefreshID = 0;
var sumStake = new Array(), sumPayOff = new Array(), sumCommission = new Array();
sumStake[14] = new Array(), sumPayOff[14] = new Array(), sumCommission[14] = new Array();
sumStake[15] = new Array(), sumPayOff[15] = new Array(), sumCommission[15] = new Array();
sumStake[16] = new Array(), sumPayOff[16] = new Array(), sumCommission[16] = new Array(),
sumStake[17] = new Array(), sumPayOff[17] = new Array(), sumCommission[17] = new Array();

var strT1 = "<?php print $_strRealBet7S["Bet1"];?>", strT7 = "<?php print $_strRealBet7S["Bet7"];?>", strT8 = "<?php print $_strRealBet7S["Bet8"];?>", strT9 = "<?php print $_strRealBet7S["Bet9"];?>", strT10 = "<?php print $_strRealBet7S["Bet10"];?>", strT11 = "<?php print $_strRealBet7S["Bet11"];?>", strT12 = "<?php print $_strRealBet7S["Bet12"];?>", strT13 = "<?php print $_strRealBet7S["Bet13"];?>", strT16 = "<?php print $_strRealBet7S["Bet16"];?>", strT18 = "<?php print $_strRealBet7S["Bet18"];?>", strTSG = "<?php print $_strRealBet7S["StartGame"];?>";

var RefreshSec = 20, intRefreshSec = 0, isRefresh = true, isLimit = false;
var arrTwin = new Array();
arrTwin[1] = "OOXX";
arrTwin[2] = "OXOX";
arrTwin[3] = "OXXO";
arrTwin[4] = "XOOX";
arrTwin[5] = "XOXO";
arrTwin[6] = "XXOO";

var arrTrinityTip = new Array();
arrTrinityTip[1] = "<?php print $_strRealBet7S["Milli"];?>";
arrTrinityTip[2] = "<?php print $_strRealBet7S["Cent"];?>";
arrTrinityTip[3] = "<?php print $_strRealBet7S["Dec"];?>";
arrTrinityTip[4] = "<?php print $_strRealBet7S["Unit"];?>";

//定膽初始化
function iniNumber(intBT){
	var arrNumber = new Array();
	if(intBT == 18){
		document.getElementById("ListStatus").innerHTML = strT18;
		document.getElementById("BetList").innerHTML = strLayer18;
	}else if(intBT == 16){
		document.getElementById("ListStatus").innerHTML = strT16;
		document.getElementById("BetList").innerHTML = strLayer16;
	}
	GetOdds();
}

function changSort(){
	intSortPlus *= -1;
	changSortClass();
	RefreshType();
}

function changSortClass(){
	document.getElementById("TenSortLink").innerHTML = (intSortPlus == -1)?"<?php print $_strRealBet7S["TenLoseSort"];//二十大負值排行?>":"<?php print $_strRealBet7S["TenWinSort"];//二十大正值排行?>";
	document.getElementById("TenSortTD").className = (intSortPlus == -1)?"G_Con_SortLoseTD":"G_Con_SortWinTD";
}

function ValueSort(arrValue, intValue, intNum, strCon){
	var i = 0, intTmp = 0, intTmp2 = 0, isMoveDown = false, strCon1 = "", strCon2 = "", intNum1 = 0, intNum2 = 0;
	for(i = 0; i < arrValue.length; i++){
		if(isMoveDown == false){
			if(arrValue[i] < intValue){
				intTmp = arrValue[i];
				intNum1 = arrSpecialNum[i];
				strCon1 = arrSpecialCon[i];
				arrValue[i] = intValue;
				arrSpecialNum[i] = intNum;
				arrSpecialCon[i] = strCon;
				isMoveDown = true;
			}
		}else{
			if(isMoveDown == true){
				intTmp2 = arrValue[i];
				intNum2 = arrSpecialNum[i];
				strCon2 = arrSpecialCon[i];
				arrValue[i] = intTmp;
				arrSpecialNum[i] = intNum1;
				arrSpecialCon[i] = strCon1;
				intTmp = intTmp2;
				intNum1 = intNum2;
				strCon1 = strCon2;
			}
		}
	}
	return arrValue;
}

//定位 一字
function ShowNumberOdds18(intBT){
	var intNum = 0, strTD = "", strTip = "", arrTmpGame = new Array(), sumOdds = 0, maxPayOff = 0, intTmp = 0, OverBetOn, OverBet, OverBetColor, intBT, preWin = 0, strClass = "", strCon = "", flOdds = 0, flComm;// sumPayOff = 0,
	var arrBT = new Array(18, 19, 20, 21, 22);
	var arrBTMinNum = new Array(0, 0, 0, 0, 0);
	var arrBTMaxNum = new Array(9, 9, 9, 9, 9);
	var strTDSite = "";

	for(var i = 0; i < arrBT.length; i++){
		intBT = arrBT[i];
		arrTmpGame = eval("Game" + intBT.toString());

		for(var intNum = arrBTMinNum[i]; intNum <= arrBTMaxNum[i]; intNum++){
			intTmp = parseFloat(arrTmpGame[intNum][9]) + parseFloat(arrTmpGame[intNum][8]);
			preWin = sumStake[intBT] - intTmp - sumCommission[intBT];
			strClass = (preWin > 0)?"G_Con_Result_Win":"G_Con_Result_Lose";

			strTDSite = intBT.toString() + "_" + intNum.toString();
			if ((OverBetOn == 1) && (arrTmpGame[intNum][8] >= OverBet)) {
				document.getElementById("OddsTD"+strTDSite).style.background = OverBetColor;
			}
			document.getElementById("OddsTD"+strTDSite).innerHTML = "<a href=\"JavaScript:void(0)\" class=\"G_Con_Odds\">"+arrTmpGame[intNum][5]+"</a>";

			strCon = "<a class=\"G_Con_Bet\" href=\"JavaScript: intSortSite=0;getWagerData("+arrTmpGame[intNum][1]+","+arrTmpGame[intNum][2]+","+intNum+",0,"+intNum+")\">"+Math.round(parseFloat(arrTmpGame[intNum][8])).toString()+"</a> / <a class=\""+strClass+"\">"+Math.round(preWin).toString()+"</a>";//+arrTmpGame[intNum][7]+"/"

			document.getElementById("Num"+strTDSite).className = (arrTmpGame[intNum][6] == "1")?"G_Con_TD_Dark":"G_Con_TD_Ball";
			document.getElementById("OddsTD"+strTDSite).className = (arrTmpGame[intNum][6] == "1")?"G_Con_TD_Dark":"G_Con_TD_Odds";

			document.getElementById("WagerTD"+strTDSite).innerHTML = strCon;
		}
		document.getElementById("SumWagerTD"+intBT.toString()).innerHTML = sumStake[intBT];
	}	//for(var i = 0; i < arrBT.length; i++)

	for(var intBT = 14; intBT <= 15; intBT++){
		arrTmpGame = eval("Game" + intBT.toString());

		for(var intNum1 = 0; intNum1 <= 3; intNum1++){
			for(var intNum2 = 0; intNum2 <= 1; intNum2++){
				intNum = intNum1*10 + intNum2;
				intTmp = parseFloat(arrTmpGame[intNum][9]) + parseFloat(arrTmpGame[intNum][8]);
				preWin = sumStake[intBT][intNum1] - intTmp - sumCommission[intBT][intNum1];
				strClass = (preWin > 0)?"G_Con_Result_Win":"G_Con_Result_Lose";

				strTDSite = intBT.toString() + "_" + intNum.toString();
				if ((OverBetOn == 1) && (arrTmpGame[intNum][8] >= OverBet)) {
					document.getElementById("OddsTD"+strTDSite).style.background = OverBetColor;
				}
				document.getElementById("OddsTD"+strTDSite).innerHTML = "<a href=\"JavaScript:void(0)\" class=\"G_Con_Odds\">"+arrTmpGame[intNum][5]+"</a>";

				strCon = "<a class=\"G_Con_Bet\" href=\"JavaScript: intSortSite=0;getWagerData("+arrTmpGame[intNum][1]+","+arrTmpGame[intNum][2]+","+intNum+",0,"+intNum+")\">"+Math.round(parseFloat(arrTmpGame[intNum][8])).toString()+"</a> / <a class=\""+strClass+"\">"+Math.round(preWin).toString()+"</a>";//+arrTmpGame[intNum][7]+"/"

				document.getElementById("Num"+strTDSite).className = (arrTmpGame[intNum][6] == "1")?"G_Con_TD_Dark":"G_Con_TD_Ball";
				document.getElementById("OddsTD"+strTDSite).className = (arrTmpGame[intNum][6] == "1")?"G_Con_TD_Dark":"G_Con_TD_Odds";

				document.getElementById("WagerTD"+strTDSite).innerHTML = strCon;
			}
		}
	}
}

//合數單雙大小
function ShowNumberOdds16(intBT){
	var intNum = 0, strTD = "", strTip = "", arrTmpGame = new Array(), sumOdds = 0, maxPayOff = 0, intTmp = 0, OverBetOn, OverBet, OverBetColor, intBT, preWin = 0, strClass = "", strCon = "", flOdds = 0, flComm;// sumPayOff = 0,
	var strTDSite = "";

	for(var intBT = 16; intBT <= 17; intBT++){
		arrTmpGame = eval("Game" + intBT.toString());

		for(var intNum1 = 0; intNum1 <= 5; intNum1++){
			for(var intNum2 = 0; intNum2 <= 1; intNum2++){
				intNum = intNum1*10 + intNum2;
				intTmp = parseFloat(arrTmpGame[intNum][9]) + parseFloat(arrTmpGame[intNum][8]);
				preWin = sumStake[intBT][intNum1] - intTmp - sumCommission[intBT][intNum1];
				strClass = (preWin > 0)?"G_Con_Result_Win":"G_Con_Result_Lose";

				strTDSite = intBT.toString() + "_" + intNum.toString();
				if ((OverBetOn == 1) && (arrTmpGame[intNum][8] >= OverBet)) {
					document.getElementById("OddsTD"+strTDSite).style.background = OverBetColor;
				}
				document.getElementById("OddsTD"+strTDSite).innerHTML = "<a href=\"JavaScript:void(0)\" class=\"G_Con_Odds\">"+arrTmpGame[intNum][5]+"</a>";

				strCon = "<a class=\"G_Con_Bet\" href=\"JavaScript: intSortSite=0;getWagerData("+arrTmpGame[intNum][1]+","+arrTmpGame[intNum][2]+","+intNum+",0,"+intNum+")\">"+Math.round(parseFloat(arrTmpGame[intNum][8])).toString()+"</a> / <a class=\""+strClass+"\">"+Math.round(preWin).toString()+"</a>";//+arrTmpGame[intNum][7]+"/"

				document.getElementById("Num"+strTDSite).className = (arrTmpGame[intNum][6] == "1")?"G_Con_TD_Dark":"G_Con_TD_Ball";
				document.getElementById("OddsTD"+strTDSite).className = (arrTmpGame[intNum][6] == "1")?"G_Con_TD_Dark":"G_Con_TD_Odds";

				document.getElementById("WagerTD"+strTDSite).innerHTML = strCon;
			}
		}
	}
}

//取得三定位 號碼組合
function getTrinityNumber(){
	for(var i = 0; i < document.OddsListForm["STrinity"].length; i++)if(document.OddsListForm["STrinity"][i].checked)var strTrinity = document.OddsListForm["STrinity"][i].value;
	for(var i = 0; i < document.OddsListForm["STrinityNo"].length; i++)if(document.OddsListForm["STrinityNo"][i].checked)var strSTriNo = document.OddsListForm["STrinityNo"][i].value;

	var arrTriNum = new Array();
	for(var i = 0; i <= 9; i++){
		for(var j = 0; j <= 9; j++){
			switch(strTrinity){
				case "Cent":
					arrTriNum[i*10 + j] = strSTriNo*100 + i*10 + j*1;
					break;
				case "Dec":
					arrTriNum[i*10 + j] = i*100 + strSTriNo*10 + j*1;
					break;
				case "Unit":
					arrTriNum[i*10 + j] = i*100 + j*10 + strSTriNo*1;
					break;
			}
		}
	}
	document.getDataForm.strLottoNumber.value = arrTriNum.join(",");
}

//取得四定位 號碼組合
function getFourNumber(){
	for(var i = 0; i < document.OddsListForm["STwin"].length; i++){
		document.getElementById("TwinTip"+i).className =  "";
		if(document.OddsListForm["STwin"][i].checked)var strSTwin = document.OddsListForm["STwin"][i].value;
	}
	for(var i = 0; i < document.OddsListForm["STrinityNo0"].length; i++){
		document.getElementById("STrinityNoTip0"+i).className =  "";
		if(document.OddsListForm["STrinityNo0"][i].checked)var strSTriNo0 = document.OddsListForm["STrinityNo0"][i].value;
	}
	for(var i = 0; i < document.OddsListForm["STrinityNo1"].length; i++){
		document.getElementById("STrinityNoTip1"+i).className =  "";
		if(document.OddsListForm["STrinityNo1"][i].checked)var strSTriNo1 = document.OddsListForm["STrinityNo1"][i].value;
	}

	var a1 = 0, a2 = 0, a3 = 0, a4 = 0;
	switch(strSTwin){
		case "0": //OOXX
			var a1 = 1000, a2 = 100, a3 = 10, a4 = 1;
			document.getElementById("STrinity0").innerHTML = arrTrinityTip[1];
			document.getElementById("STrinity1").innerHTML = arrTrinityTip[2];
			break;
		case "1": //OXOX
			var a1 = 1000, a2 = 10, a3 = 100, a4 = 1;
			document.getElementById("STrinity0").innerHTML = arrTrinityTip[1];
			document.getElementById("STrinity1").innerHTML = arrTrinityTip[3];
			break;
		case "2": //OXXO
			var a1 = 1000, a2 = 1, a3 = 100, a4 = 10;
			document.getElementById("STrinity0").innerHTML = arrTrinityTip[1];
			document.getElementById("STrinity1").innerHTML = arrTrinityTip[4];
			break;
		case "3": //XOOX
			var a1 = 100, a2 = 10, a3 = 1000, a4 = 1;
			document.getElementById("STrinity0").innerHTML = arrTrinityTip[2];
			document.getElementById("STrinity1").innerHTML = arrTrinityTip[3];
			break;
		case "4": //XOXO
			var a1 = 100, a2 = 1, a3 = 1000, a4 = 10;
			document.getElementById("STrinity0").innerHTML = arrTrinityTip[2];
			document.getElementById("STrinity1").innerHTML = arrTrinityTip[4];
			break;
		case "5": //XXOO
			var a1 = 10, a2 = 1, a3 = 1000, a4 = 100;
			document.getElementById("STrinity0").innerHTML = arrTrinityTip[3];
			document.getElementById("STrinity1").innerHTML = arrTrinityTip[4];
			break;
	}
	document.getElementById("TwinTip"+strSTwin).className =  "G_Con_St_Trinity";
	document.getElementById("STrinityNoTip0"+strSTriNo0).className =  "G_Con_St_Trinity";
	document.getElementById("STrinityNoTip1"+strSTriNo1).className =  "G_Con_St_Trinity";

	var arrTriNum = new Array();
	for(var i = 0; i <= 9; i++){
		for(var j = 0; j <= 9; j++){
			arrTriNum[i*10 + j] = strSTriNo0*a1 + strSTriNo1*a2 + i*a3 + j*a4;
		}
	}
	document.getDataForm.strLottoNumber.value = arrTriNum.join(",");
}

//四定位 初始化
function iniFourNumber(intBT){
	var strNum = "", strOtherMsg = "";
	if(null == document.getElementById("FourTypeTD"))document.getElementById("BetList").innerHTML = strLayer11;

	if(document.OddsListForm["STrinity"][0].checked){
		document.getDataForm.OtherMsg.value = "Sort";
		document.getElementById("FourTypeTD").style.display = "none";
		document.getElementById("STrinity0").innerHTML = "&nbsp;";
		document.getElementById("STrinity1").innerHTML = "&nbsp;";
	}else{
		document.getDataForm.OtherMsg.value = "";
		document.getElementById("FourTypeTD").style.display = "block";
		getFourNumber();
	}
	GetOdds();
}

//三字 初始化
function ini3WordNumber(intBT){
	var strNum = "", strOtherMsg = "";
	if(null == document.getElementById("TreeWordTD"))document.getElementById("BetList").innerHTML = strLayer13;

	if(document.OddsListForm["STrinity"][0].checked){
		document.getDataForm.OtherMsg.value = "Sort";
	}else{
		document.getDataForm.OtherMsg.value = "";
	}
	var arrTriNum = new Array(), j = 0;
	for(var i = 0; i <= 999; i++){
		if(i < 100){
			if(Math.floor(i / 10) > (i % 10))continue;
		}else{
			if(Math.floor(i / 10) > (i % 100))continue;
			if(Math.floor((i % 100) / 10) > (i % 10))continue;
		}
		arrTriNum[j] = i;
		j++;
	}
	document.getDataForm.strLottoNumber.value = arrTriNum.join(",");
	GetOdds();
}

//三字 賠率表
function Show3WordNumber(intBT){
	var intNum, arrTmpGame = new Array(), objOTD, objNTD, intTmp = 0, preWin = 0, strClass = "", strNum = "", intSNum;
	var arrColor = ["#000000", "#FF0000", "#330099", "#336600", "#660099", "#FF6600", "#660000", "#004080", "#800080", "#808000"];
	var strColor = "";

	arrTmpGame = eval("Game" + intBT.toString());
	for(intNum = 0; intNum <= 219; intNum++){
		intSNum = intNum;
		/*if(document.OddsListForm["STrinity"][0].checked){
			intSNum = (intNum % 10)*10 + Math.floor(intNum / 10);
		}*/
		strNum = arrTmpGame[intNum][3];

		intTmp = parseFloat(arrTmpGame[intNum][9]) + parseFloat(arrTmpGame[intNum][8]);
		preWin = sumStake[intBT] - intTmp - sumCommission[intBT];
		strClass = (preWin > 0)?"G_Con_Result_Win":"G_Con_Result_Lose";

		objNTD = document.getElementById("Num13_"+intSNum.toString());
		objOTD = document.getElementById("OddsTD13_"+intSNum.toString());

		strCon = "<a href=\"JavaScript:void(0)\" class=\"G_Con_Odds\">"+arrTmpGame[intNum][5]+"</a><br />";
		strCon += "<a class=\"G_Con_Bet\" href=\"JavaScript: getWagerData("+arrTmpGame[intNum][1]+","+arrTmpGame[intNum][2]+","+strNum+",0,"+intSNum+")\">"+Math.round(parseFloat(arrTmpGame[intNum][8])).toString()+"</a><br /><a class=\""+strClass+"\">"+Math.round(preWin).toString()+"</a>";//+arrTmpGame[intNum][7]+"/"

		strColor = arrColor[Math.floor(strNum*1 / 100)];
		if(strNum.length == 1)strNum = "00"+strNum;
		if(strNum.length == 2)strNum = "0"+strNum;
		objNTD.innerHTML = "<a href='JavaScript:void(0)' class='G_Con_Numer_blue' id='NumSB13_"+intSNum.toString()+"' style='color: "+strColor+"'>" + strNum + "</a>";
		objNTD.className = (arrTmpGame[intNum][6] == "1")?"G_Con_TD_Dark":"G_Con_TD_Ball";
		objOTD.className = (arrTmpGame[intNum][6] == "1")?"G_Con_TD_Dark":"G_Con_TD_Odds";

		objOTD.innerHTML = strCon;
	}
	document.getElementById("TwinSumStake").innerHTML = sumStake[intBT];
}

//三定位 初始化
function iniTrinityNumber(intBT){
	var strNum = "", strOtherMsg = "";
	if(null == document.getElementById("TrinityTypeTD")){
		document.getElementById("BetList").innerHTML = strLayer7;
	}

	if(document.OddsListForm["STrinity"][0].checked){
		document.getDataForm.OtherMsg.value = "Sort";
	}else{
		document.getDataForm.OtherMsg.value = "";
		getTrinityNumber();
	}

	document.getElementById("TwinTip7").className =  "";
	document.getElementById("TwinTip8").className =  "";
	document.getElementById("TwinTip9").className =  "";
	document.getElementById("TwinTip10").className =  "";
	document.getElementById("TwinTip"+intBT).className =  "G_Con_St_Trinity";
	switch(intBT){
		case 7:
			document.getElementById("STrinityTip1").innerHTML = arrTrinityTip[1];
			document.getElementById("STrinityTip2").innerHTML = arrTrinityTip[2];
			document.getElementById("STrinityTip3").innerHTML = arrTrinityTip[3];
			break;

		case 8:
			document.getElementById("STrinityTip1").innerHTML = arrTrinityTip[1];
			document.getElementById("STrinityTip2").innerHTML = arrTrinityTip[2];
			document.getElementById("STrinityTip3").innerHTML = arrTrinityTip[4];
			break;

		case 9:
			document.getElementById("STrinityTip1").innerHTML = arrTrinityTip[1];
			document.getElementById("STrinityTip2").innerHTML = arrTrinityTip[3];
			document.getElementById("STrinityTip3").innerHTML = arrTrinityTip[4];
			break;

		case 10:
			document.getElementById("STrinityTip1").innerHTML = arrTrinityTip[2];
			document.getElementById("STrinityTip2").innerHTML = arrTrinityTip[3];
			document.getElementById("STrinityTip3").innerHTML = arrTrinityTip[4];
			break;
	}
	GetOdds();
}

function ChangeUnit(){
	ChangeBet(strBetType);
}

function ChangeBetNo(){
	ChangeBet(strBetType);
}


//四定位 賠率表
function ShowFourNumber(intBT){
	var intNum, arrTmpGame = new Array(), objOTD, objNTD, intTmp = 0, preWin = 0, strClass = "", strNum = "", intSNum;

	arrTmpGame = eval("Game" + intBT.toString());
	for(intNum = 0; intNum <= 99; intNum++){
		intSNum = intNum;
		if(document.OddsListForm["STrinity"][0].checked){
			intSNum = (intNum % 10)*10 + Math.floor(intNum / 10);
		}
		strNum = arrTmpGame[intNum][3];

		intTmp = parseFloat(arrTmpGame[intNum][9]) + parseFloat(arrTmpGame[intNum][8]);
		preWin = sumStake[intBT] - intTmp - sumCommission[intBT];
		strClass = (preWin > 0)?"G_Con_Result_Win":"G_Con_Result_Lose";

		objNTD = document.getElementById("Num11_"+intSNum.toString());
		objOTD = document.getElementById("OddsTD11_"+intSNum.toString());

		strCon = "<a href=\"JavaScript:void(0)\" class=\"G_Con_Odds\">"+arrTmpGame[intNum][5]+"</a><br />";
		strCon += "<a class=\"G_Con_Bet\" href=\"JavaScript: getWagerData("+arrTmpGame[intNum][1]+","+arrTmpGame[intNum][2]+","+strNum+",0,"+intSNum+")\">"+Math.round(parseFloat(arrTmpGame[intNum][8])).toString()+"</a><br /><a class=\""+strClass+"\">"+Math.round(preWin).toString()+"</a>";//+arrTmpGame[intNum][7]+"/"

		if(strNum.length == 1)strNum = "000"+strNum;
		if(strNum.length == 2)strNum = "00"+strNum;
		if(strNum.length == 3)strNum = "0"+strNum;
		objNTD.innerHTML = "<a href='JavaScript:void(0)' class='G_Con_Numer_blue' id='NumSB11_"+intSNum.toString()+"'>" + strNum + "</a>";
		objNTD.className = (arrTmpGame[intNum][6] == "1")?"G_Con_TD_Dark":"G_Con_TD_Ball";
		objOTD.className = (arrTmpGame[intNum][6] == "1")?"G_Con_TD_Dark":"G_Con_TD_Odds";

		objOTD.innerHTML = strCon;
	}
	document.getElementById("TwinSumStake").innerHTML = sumStake[intBT];
}

//三定位 賠率表
function ShowTrinityNumber(intBT){
	var intNum, arrTmpGame = new Array(), objOTD, objNTD, intTmp = 0, preWin = 0, strClass = "", strNum = "", intSNum, strLNum = "", strMNum = "", strRNum = "", strShowNum = "";

	arrTmpGame = eval("Game" + intBT.toString());
	for(intNum = 0; intNum <= 99; intNum++){
		intSNum = intNum;
		if(document.OddsListForm["STrinity"][0].checked){
			intSNum = (intNum % 10)*10 + Math.floor(intNum / 10);
		}
		strNum = arrTmpGame[intNum][3];

		intTmp = parseFloat(arrTmpGame[intNum][9]) + parseFloat(arrTmpGame[intNum][8]);
		preWin = sumStake[intBT] - intTmp - sumCommission[intBT];
		strClass = (preWin > 0)?"G_Con_Result_Win":"G_Con_Result_Lose";

		objNTD = document.getElementById("Num7_"+intSNum.toString());
		objOTD = document.getElementById("OddsTD7_"+intSNum.toString());

		strCon = "<a href=\"JavaScript:void(0)\" class=\"G_Con_Odds\">"+arrTmpGame[intNum][5]+"</a><br />";
		strCon += "<a class=\"G_Con_Bet\" href=\"JavaScript: getWagerData("+arrTmpGame[intNum][1]+","+arrTmpGame[intNum][2]+","+strNum+",0,"+intSNum+")\">"+Math.round(parseFloat(arrTmpGame[intNum][8])).toString()+"</a><br /><a class=\""+strClass+"\">"+Math.round(preWin).toString()+"</a>";//+arrTmpGame[intNum][7]+"/"

		if(strNum.length == 1)strNum = "00"+strNum;
		if(strNum.length == 2)strNum = "0"+strNum;
		strLNum = strNum.substr(0,1);
		strMNum = strNum.substr(1,1);
		strRNum = strNum.substr(2,1);
		switch(intBT){
			case 7:
				strShowNum = strLNum + strMNum + strRNum + "x";
				break;

			case 8:
				strShowNum = strLNum + strMNum + "x" + strRNum;
				break;

			case 9:
				strShowNum = strLNum + "x" + strMNum + strRNum;
				break;

			case 10:
				strShowNum = "x" + strLNum + strMNum + strRNum;
				break;
		}

		objNTD.innerHTML = "<a href='JavaScript:void(0)' class='G_Con_Numer_blue'>" + strShowNum + "</a>";
		objNTD.className = (arrTmpGame[intNum][6] == "1")?"G_Con_TD_Dark":"G_Con_TD_Ball";
		objOTD.className = (arrTmpGame[intNum][6] == "1")?"G_Con_TD_Dark":"G_Con_TD_Odds";

		objOTD.innerHTML = strCon;
	}
	document.getElementById("TwinSumStake").innerHTML = sumStake[intBT];
}

//二定位 初始化
function iniTwinNumer(intBT){
	var strNum = "", strLNum = "", strRNum = "", strShowNum = "";
	document.getElementById("ListStatus").innerHTML = (strBetType == "12")?strT12:(strT1 + "-" + arrTwin[intBT]);
	document.getElementById("BetList").innerHTML = strLayer1;
	//if(document.getElementById("Num1_99").innerHTML == "99"){
		for(var i = 0; i <= 99; i++){
			if(strBetType == "12"){
				if(Math.floor(i / 10) > (i % 10)){
					document.getElementById("Num1_"+i.toString()).innerHTML = "";
					continue;
				}
			}

			strNum = i.toString();
			if(i < 10)strNum = "0" + strNum;
			strLNum = strNum.substr(0,1);
			strRNum = strNum.substr(1,1);
			switch(intBT){
				case 1:
					strShowNum = strLNum + strRNum + "xx";
					break;

				case 2:
					strShowNum = strLNum + "x" + strRNum + "x";
					break;

				case 3:
					strShowNum = strLNum + "xx" + strRNum;
					break;

				case 4:
					strShowNum = "x" + strLNum + strRNum + "x";
					break;

				case 5:
					strShowNum = "x" + strLNum + "x" + strRNum;
					break;

				case 6:
					strShowNum = "xx" + strLNum + strRNum;
					break;

				default:
					strShowNum = strNum;
					break;
			}
			document.getElementById("Num1_"+i.toString()).innerHTML = "<a href='JavaScript:void(0)' class='G_Con_Numer_blue'>" + strShowNum + "</a>";
		}
	//}
	if(strBetType == "12"){
		document.getElementById("TwinTypeTD").style.display = "none";
	}else{
		document.getElementById("TwinBT"+intBT).checked = true;
	}
	GetOdds();
}

//顯示 二定位 賠率表
function ShowTwinNumer(intBT){
	var intNum, arrTmpGame = new Array(), objOTD, objNTD, intTmp = 0, preWin = 0, strClass = "";
	var arrN = new Array(-1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000);

	//雙飛
	arrTmpGame = eval("Game" + intBT.toString());
	for(intNum = 0; intNum <= 99; intNum++){
		if(strBetType == "12"){
			if(Math.floor(intNum / 10) > (intNum % 10))continue;
		}

		intTmp = parseFloat(arrTmpGame[intNum][9]) + parseFloat(arrTmpGame[intNum][8]);
		preWin = sumStake[intBT] - intTmp - sumCommission[intBT];
		strClass = (preWin > 0)?"G_Con_Result_Win":"G_Con_Result_Lose";

		objNTD = document.getElementById("Num1_"+intNum.toString());
		objOTD = document.getElementById("OddsTD1_"+intNum.toString());

		strCon = "<a href=\"JavaScript:void(0)\" class=\"G_Con_Odds\">"+arrTmpGame[intNum][5]+"</a><br />";
		strCon += "<a class=\"G_Con_Bet\" href=\"JavaScript: getWagerData("+arrTmpGame[intNum][1]+","+arrTmpGame[intNum][2]+","+intNum.toString()+",0,"+intNum.toString()+")\">"+Math.round(parseFloat(arrTmpGame[intNum][8])).toString()+"</a><br /><a class=\""+strClass+"\">"+Math.round(preWin).toString()+"</a>";//+arrTmpGame[intNum][7]+"/"

		arrN = ValueSort(arrN, preWin*intSortPlus, intNum, strCon);

		objNTD.className = (arrTmpGame[intNum][6] == "1")?"G_Con_TD_Dark":"G_Con_TD_Ball";
		objOTD.className = (arrTmpGame[intNum][6] == "1")?"G_Con_TD_Dark":"G_Con_TD_Odds";

		objOTD.innerHTML = strCon;
	}
	document.getElementById("TwinSumStake").innerHTML = sumStake[intBT];

	changSortClass();
	for(var i = 0; i < arrSpecialNum.length; i++){
		intNum = arrSpecialNum[i];
		objNTD = document.getElementById("NumSort1_"+(i+1).toString());
		objOTD = document.getElementById("OddsTDSort1_"+(i+1).toString());

		objNTD.innerHTML = "<a href=\"JavaScript:void(0)\" class=\"G_Con_Numer_Green\">" + ((intNum < 10)?"0"+intNum:intNum) + "</a>";
		//alert(arrSpecialCon[i]);
		arrSpecialCon[i] = arrSpecialCon[i].replace("ShowOddsLayer", "intSortSite="+(i+1)+";ShowOddsLayer");
		arrSpecialCon[i] = arrSpecialCon[i].replace("ShowOddsLayer", "intSortSite="+(i+1)+";ShowOddsLayer");
		//alert(arrSpecialCon[i]);
		objOTD.innerHTML = arrSpecialCon[i];
		objNTD.className = document.getElementById("Num1_"+intNum.toString()).className + "_Sort";
		objOTD.className = document.getElementById("OddsTD1_"+intNum.toString()).className+"_Sort";
	}
}

//雙飛 重置
function ResetTwinNumber(){
	document.OddsListForm.reset();
	if(document.getDataForm.Bet_Type.value != "12")document.getElementById("TwinBT"+document.getDataForm.Bet_Type.value).checked = true; 
}

//開放停押，所有號碼和項目
function StopAllBet(isStop, strBT){
	with(document.getDataForm){
		op.value = "StopBet";
		isStopBet.value = isStop;
		Bet_Type.value = strBT;
		strLottoNumber.value = strLottoNum;
		submit();
	}
}

//開放停押，只單一號碼或項目
function StopBet(intBT, intNum){
	var objGame = eval("Game" + intBT);
	with(document.getDataForm){
		isStopBet.value = (Game1[intNum][11] == "1")?0:1;
		op.value = "StopBet";
		Bet_Type.value = intBT;
		strLottoNumber.value = intNum;
		submit();
	}
}

function CountRefresh(){
	if(intRefreshSec >= RefreshSec)isRefresh = true;
	intRefreshSec++;
}

//取得賠率樣版
function GetTemplate(){
	setInterval("CountRefresh();", 1000);
	if(strLayer010203)return;
	with(document.getDataForm){
		op.value = "GetTemplate";
		submit();
	}
}

//取得賠率
function GetOdds(){
	if(isRefresh == false && isLimit == true){
		document.getDataForm.action = "https://tw.i1.yimg.com/tw.yimg.com/i/tw/weather/02.gif";
		document.getDataForm.submit();
		window.status = "";
		isLimit = false;
		return;
	}

	with(document.getDataForm){
		action = "index.php";
		Bet_Type.value = strBetType;
		op.value = "GetOdds";
		submit();
	}
	isRefresh = false;
	intRefreshSec = 0;
	isLimit = false;
}

function checkOdds(){
	document.getElementById("odds_win").style.display = "none";
	return true;
}

//給選擇樂透種類下拉選單用
function LottoSelect(){
	with(document.OddsListForm){
		target = "_self";
		switch(LottoID.value){
			case "1":
				action = "/k_admin/RealBet/index.php";
				break;

			case "2":
			case "3":
			case "6":
			case "7":
			case "8":
				action = "/k_admin/RealBet3D/index.php";
				break;

			case "4":
				action = "/k_admin/RealBet7Star/index.php";
				break;

			case "5":
				action = "/k_admin/RealBet10M/index.php";
				break;
		}
		submit();
	}
}

//更改下注種類賠率表
function ChangeBet(intBT){
	close_WagerWin();
	document.getDataForm.SpecialNumType.value = "0";
	switch(intBT){
		// 定位
		case 18:
			document.getElementById("ListStatus").innerHTML = strT18;
			strBetType = "14,15,18,19,20,21,22";
			document.getDataForm["Bet_Type"].value = "14,15,18,19,20,21,22";
			iniNumber(18);
			break;

		//合數單雙大小
		case 16:
			document.getElementById("ListStatus").innerHTML = strT16;
			strBetType = "16,17";
			document.getDataForm["Bet_Type"].value = "16,17";
			iniNumber(16);
			break;

		//二定位
		case 1:
		case 2:
		case 3:
		case 4:
		case 5:
		case 6:
			document.getElementById("ListStatus").innerHTML = strT1;
			strBetType = intBT;
			document.getDataForm["Bet_Type"].value = intBT;
			iniTwinNumer(intBT);
			document.getElementById("TwinTip1").className =  "";
			document.getElementById("TwinTip2").className =  "";
			document.getElementById("TwinTip3").className =  "";
			document.getElementById("TwinTip4").className =  "";
			document.getElementById("TwinTip5").className =  "";
			document.getElementById("TwinTip6").className =  "";
			document.getElementById("TwinTip"+intBT).className =  "G_Con_St_Trinity";
			break;

		//二字
		case 12:
			document.getElementById("ListStatus").innerHTML = strT12;
			strBetType = intBT;
			document.getDataForm["Bet_Type"].value = intBT;
			iniTwinNumer(intBT);
			break;

		// 三定位
		case 7:
		case 8:
		case 9:
		case 10:
			document.getElementById("ListStatus").innerHTML = eval("strT"+intBT);
			strBetType = intBT;
			document.getDataForm["Bet_Type"].value = intBT;
			iniTrinityNumber(intBT);
			break;

		// 四定位
		case 11:
			document.getElementById("ListStatus").innerHTML = eval("strT"+intBT);
			strBetType = intBT;
			document.getDataForm["Bet_Type"].value = intBT;
			iniFourNumber(intBT);
			break;

		//三字
		case 13:
			document.getElementById("ListStatus").innerHTML = strT13;
			strBetType = intBT;
			document.getDataForm["Bet_Type"].value = intBT;
			ini3WordNumber(intBT);
			break;
	}
}

//顯示以開獎表格
function StartGame(){
	var KGame = new Array(), strGID = "", strBID = "";
	close_WagerWin();
	document.getDataForm.op.value = "StartGame";
	document.getElementById("BetList").innerHTML = strLayerStart;
	document.getElementById("ListStatus").innerHTML = strTSG;

	var objOTable = document.getElementById("OddsTable");
	var docloc="getWagerStart.xml.php?LottoID="+strLottoID+"&isStop=0";
	if (document.implementation && document.implementation.createDocument) {
		KGameDOM = document.implementation.createDocument("", "", null);
	} else if (window.ActiveXObject) {
		KGameDOM = new ActiveXObject("Microsoft.XMLDOM");
		KGameDOM.async = false;
	}
	KGameDOM.load(docloc);
	var root = KGameDOM.documentElement;

	if(root == null)return;
	with(objOTable)	{
		while(rows.length > 1)	deleteRow(rows.length - 1);

		for (var i = 0; i < root.childNodes.length; i++) {
			newTR = insertRow();
			newTR.className = "G_Con_TR";
			with(newTR){
				if (root.childNodes.item(i).tagName == "WagerData") {
					KGame[i]=root.childNodes.item(i);
					newTD = insertCell();
					newTD.innerHTML = KGame[i].getElementsByTagName("GameDate").item(0).text + "&nbsp;" + KGame[i].getElementsByTagName("GameTime").item(0).text;

					newTD = insertCell();
					newTD.innerHTML = KGame[i].getElementsByTagName("GameNo").item(0).text;

					newTD = insertCell();
					newTD.align = "left";
					newTD.innerHTML = KGame[i].getElementsByTagName("BetType").item(0).text;

					strGID = KGame[i].getElementsByTagName("GambleID").item(0).text;
					strBID = KGame[i].getElementsByTagName("BID").item(0).text;
					newTD = insertCell();
					newTD.align = "left";
					newTD.id = "OddsTD"+strBID;
					if(document.getDataForm.isRealShow.value == "1"){
						newTD.innerHTML = "<a class=\"G_Con_Bet_Start\" href=\"JavaScript:getWagerData("+strGID+","+strBID+",-1,1,-1)\">"+KGame[i].getElementsByTagName("CountNo").item(0).text+"&nbsp;/&nbsp;"+KGame[i].getElementsByTagName("RateMemStake").item(0).text+"</a>";
					}else{
						newTD.innerHTML = "<a class=\"G_Con_Bet_Start\" href=\"JavaScript:getWagerData("+strGID+","+strBID+",-1,1,-1)\">"+KGame[i].getElementsByTagName("CountNo").item(0).text+"&nbsp;/&nbsp;"+KGame[i].getElementsByTagName("AllMemStake").item(0).text+"</a>";
					}
				}
			}
		}
	}
}

function ChangeGambleType(obj){
	with(document.getDataForm){
		ChangeGameType.value = "Yes";
		GameType.value = obj.value;
		submit();
		ChangeGameType.value = "No";
	}
}

function RefreshType(){
	with(document.getDataForm){
		if(op.value == "StartGame"){
			StartGame();
		}else{
			GetOdds();
		}
	}
}

function RClock(i){
	if (RSeconds == 0){
		intRefreshSec = 0;
		RefreshType();
		RSeconds = i;
	}
	RSeconds --;
	if(document.getElementById("RSec"))document.getElementById("RSec").innerHTML = RSeconds;
}

function ChangeRefreshSec(obj){
	if(AutoRefreshID > 0)clearInterval(AutoRefreshID);
	AutoRefreshID = setInterval("RClock("+obj.value+")",1000);
}

function ChangeReal(obj){
	document.getDataForm.isRealShow.value = obj.value;
	RefreshType();
}

function close_WagerWin(){
	document.getElementById("wager_win").style.display = "none";
}

var KGameDOM;
function getWagerData(GID, BID, Num, isStop, CellNum) {
	var KGame = new Array(), strTD = "", intGap = 0, strSymbol = "";
	var objWTable = document.getElementById("WagerTable");
	var objWLayer = document.getElementById("WagerLayer");
	var strBID = BID;
	var docloc="getWager.xml.php?GambleID="+GID+"&Bet_Type="+strBID+"&Number="+Num+"&isStop="+isStop+"&isRealShow="+document.getDataForm.isRealShow.value;

	if (document.implementation && document.implementation.createDocument) {
		KGameDOM = document.implementation.createDocument("", "", null);
	} else if (window.ActiveXObject) {
		KGameDOM = new ActiveXObject("Microsoft.XMLDOM");
		KGameDOM.async = false;
	}
	KGameDOM.load(docloc);
	var root = KGameDOM.documentElement;

	if(root != null){
		if(Num == -1){
			strTD = "OddsTD"+BID;
		}else{
			switch(BID){
				case 18:
				case 19:
				case 20:
				case 21:
				case 22:
					strTD = "WagerTD"+BID+"_"+CellNum;
					break;

				case 1:
				case 2:
				case 3:
				case 4:
				case 5:
				case 6:
				case 12:
					strTD = "OddsTD1_"+CellNum;
					break;

				case 7:
				case 8:
				case 9:
				case 10:
					strTD = "OddsTD7_"+CellNum;
					break;

				default:
					strTD = "OddsTD"+BID+"_"+CellNum;
					break;
			}
		}
		document.getElementById("wager_win").style.top = document.getElementById(strTD).offsetTop + document.getElementById(strTD).clientHeight+72+intGap;
		document.getElementById("wager_win").style.left = document.getElementById(strTD).offsetLeft;
		document.getElementById("wager_win").style.display = "block";
	}else{
		close_WagerWin();
		return;
	}
	with(objWTable)	{
		while(rows.length > 1)	deleteRow(rows.length - 1);

		for (var i = 0; i < root.childNodes.length; i++) {
			newTR = insertRow();
			newTR.className = "Account_Con_BG";
			with(newTR){
				if (root.childNodes.item(i).tagName == "WagerData") {
					KGame[i]=root.childNodes.item(i);
					newTD = insertCell();
					newTD.align = "left";
					newTD.innerHTML = KGame[i].getElementsByTagName("BetDate").item(0).text + "&nbsp;" + KGame[i].getElementsByTagName("BetTime").item(0).text + "<br />" + KGame[i].getElementsByTagName("BetNo").item(0).text;

					newTD = insertCell();
					newTD.align = "right";
					newTD.innerHTML = KGame[i].getElementsByTagName("Account").item(0).text;

					newTD = insertCell();
					newTD.innerHTML = KGame[i].getElementsByTagName("Content").item(0).text;

					newTD = insertCell();
					newTD.align = "right";
					strSymbol = (KGame[i].getElementsByTagName("WType").item(0).text == "<?php print $_SESSION["Admin_Info"] -> MemberGroup;?>")?"-":"";
					if(KGame[i].getElementsByTagName("OneStake").item(0).text != ""){
						newTD.innerHTML = strSymbol + KGame[i].getElementsByTagName("OneStake").item(0).text + "<br /><br />" + strSymbol + KGame[i].getElementsByTagName("Stake").item(0).text;
					}else{
						newTD.innerHTML = strSymbol + KGame[i].getElementsByTagName("Stake").item(0).text;
					}

					newTD = insertCell();
					newTD.align = "right";
					newTD.innerHTML = KGame[i].getElementsByTagName("Income").item(0).text;
				}
			}
		}
	}
	objWLayer.style.height = (objWTable.clientHeight > 300)?300:objWTable.clientHeight;
}
//-->
</script>
</head>

<body class="Mybody" onload="ChangeBet(1);">
<form action="index.php" target="_self" method="Get" name="OddsListForm">
<table class="G_Table" cellspacing="1" cellpadding="0">
<tr>
	<td colspan="10" class="G_Title" align="left"><?php print $_strRealBet7S["Title"];?> (List)</td>
</tr>
<tr>
	<td colspan="10" class="MyUp">
		<table width="100%" cellspacing="0" cellpadding="0" border="0">
			<tr>
				<td align="right" class="G_Menu">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td align="left"><a class="G_text"><?php print $_strRealBet7S["LottoKind"];//種類：?><?php print MakeLottoSelect($_arrLotto, $intLottoID, "LottoID", "LottoSelect()", $_intLang)?></a></td>
		<td align="left">
		<select onchange="ChangeReal(this)">
			<option value="0">-<?php print $_strRealBet7S["AllBet"];?>-</option>
			<option value="1" selected>-<?php print $_strRealBet7S["RealBet"];?>-</option>
			<?php
			if(($arrPower[1] == "director") && $_SESSION["Admin_Info"] -> isAllAccount == 1){
				?><option value="2">-<?php print $_strRealBet7S["CompBet"];?>-</option><?php
			}
			?>
		</select>&nbsp;
		<a class="G_text"><?php print $_strRealBet7S["RefreshWay"];//更新：?></a>
		<select onchange="ChangeRefreshSec(this)">
			<option value="">-No-</option>
			<option value="10">10 sec</option>
			<option value="20">20 sec</option>
			<option value="30">30 sec</option>
			<option value="40">40 sec</option>
			<option value="50">50 sec</option>
			<option value="60">60 sec</option>
		</select>&nbsp;<input type="button" class="submit" value="<?php print $_strRealBet7S["Reset"];//重新整理?>" onclick="isLimit = true;RefreshType();"> </td>
		<td align="left"><a class="G_text"><?php print $_strRealBet7S["LineKind"];//分盤：?></a>
		<select name="GambleType" onchange="ChangeGambleType(this)">
			<option value="1"<?php print ($_data["GameType"] == "1")?" selected":"";?>>A</option>
			<option value="2"<?php print ($_data["GameType"] == "2")?" selected":"";?>>B</option>
			<option value="3"<?php print ($_data["GameType"] == "3")?" selected":"";?>>C</option>
		</select>
		</td>
		<td align="right" valign="bottom" width="480" style="font-size: <?php print ($_intLang == 3)?"1":"8";?>px">
		<!--########## 定位 ##########//-->
			<a href="JavaScript:ChangeBet(18)" id="M_18" class="while_link"><?php print $_strRealBet7S["Bet18"];//定位?></a>
		<!--########## 二定位 ##########//-->
			&nbsp;<a class="a_text">|</a>&nbsp;
			<a href="JavaScript:ChangeBet(1)" id="M_1" class="while_link"><?php print $_strRealBet7S["Bet1"];//二定位?></a>
		<!--########## 三定位 ##########//-->
			&nbsp;<a class="a_text">|</a>&nbsp;
			<a href="JavaScript:ChangeBet(7)" id="M_7" class="while_link"><?php print $_strRealBet7S["BetAll7"];//三定位?></a>
		<!--########## 四定位 ##########//-->
			&nbsp;<a class="a_text">|</a>&nbsp;
			<a href="JavaScript:ChangeBet(11)" id="M_11" class="while_link"><?php print $_strRealBet7S["Bet11"];//四定位?></a>
		<!--########## 二字 ##########//-->
			&nbsp;<a class="a_text">|</a>&nbsp;
			<a href="JavaScript:ChangeBet(12)" id="M_12" class="while_link"><?php print $_strRealBet7S["Bet12"];//二字?></a>
		<!--########## 三字 ##########//-->
			&nbsp;<a class="a_text">|</a>&nbsp;
			<a href="JavaScript:ChangeBet(13)" id="M_13" class="while_link"><?php print $_strRealBet7S["Bet13"];//三字?></a>
		<!--########## 合數單雙大小 ##########//-->
			&nbsp;<a class="a_text">|</a>&nbsp;
			<a href="JavaScript:ChangeBet(16)" id="M_16" class="while_link"><?php print $_strRealBet7S["Bet16"];//合數單雙大小?></a>
		<!--########## 已開獎 ##########//-->
			&nbsp;<a class="a_text">|</a>&nbsp;
			<a href="JavaScript:StartGame()" id="M_CS" class="while_link"><?php print $_strRealBet7S["StartGame"];//已開獎?></a>
		</td>
	</tr>
</table>
				</td>
			</tr>
		</table>
	</td>
</tr>
<tr>
	<td colspan="10" class="G_OutSubMenu">
		<table width="100%" cellspacing="0" cellpadding="0" border="0">
			<tr>
				<td align="right" class="G_SubMenu">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td align="left" class="G_SubMenuCon" width="70%"><?php print $_strRealBet7S["ListStatus"];//目前表單狀態：?><a id="ListStatus" class="G_Sec">Special Ball</a>&nbsp;--&nbsp;<?php print $_strRealBet7S["GameNo"];//期數?><b style="font-size: 16">&nbsp;:&nbsp;</b><a class="G_Sec"><?php print $arrGamble["SerialNo"];?></a>&nbsp;--&nbsp;<?php print $_strRealBet7S["GameTime"];//時間?><b style="font-size: 16">&nbsp;:&nbsp;</b><a class="G_Sec"><?php print $_strGDate;?></a></td>
		<td align="center" class="G_SubMenuCon">&nbsp;</td>
		<td align="right" class="G_SubMenuCon"><?php print $_strRealBet7S["RefreshSec"];//更新秒數：?><a class="G_Sec" id="RSec">--</a></td>
	</tr>
</table>
				</td>
			</tr>
		</table>
	</td>
</tr>
<tr>
	<td><span id="BetList"></span></td>
</tr>
</table>
</form>
<!----------------------下注明細圖層---------------------------->
<div id="wager_win" style="display: none;position:absolute">
<table width="120" border="0" cellspacing="1" cellpadding="2" bgcolor="00558E">
<tr><td bgcolor="#FFFFFF">
<table width="120" border="0" cellspacing="0" cellpadding="0" class="m_tab_fix" >
<tr bgcolor="0163A2"> 
<td width="100" style="font-size:12px"><font color="#FFFFFF">&nbsp;<?php print $_strRealBet7S["WagerList"];?></td>
<td align="right" valign="top" ><a style="cursor:hand;" onClick="close_WagerWin();"><img src="/images/k_admin/edit_dot.gif" width="16" height="14"></a></td>
</tr>
<tr bgcolor="#000000"><td colspan="2" height="1"></td></tr>
<tr bgcolor="#FFCC66"> 
<td colspan="2">
<div style="height:300px; overflow:auto; overflow-x:hidden;" id="WagerLayer">
<table id="WagerTable" class="MyTable" cellspacing="1" cellpadding="3" style="width: 483px;">
<tr align="center">
	<td width="60" class="MyTitleL"><?php print $_strRealBet7S["WGameTime"];?></td>
	<td width="80" class="MyTitleL"><?php print $_strRealBet7S["WAccount"];?></td>
	<td width="170" class="MyTitleL"><?php print $_strRealBet7S["WCont"];?></td>
	<td width="70" class="MyTitleL"><?php print $_strRealBet7S["WStake"];?></td>
	<td width="70" class="MyTitleL"><?php print $_strRealBet7S["WResult"];?></td>
</tr>
</table>
</div>
</td></tr></table>
</td></tr></table>
</div>
<!----------------------下注明細圖層----------------------------> 
<iframe src="" width="50" height="50" name="getData" frameBorder="0" scrolling="no"></iframe>
<form action="index.php" target="getData" name="getDataForm">
<input type="hidden" name="op" value="GetOdds">
<input type="hidden" name="LottoID" value="<?php print $intLottoID;?>">
<input type="hidden" name="GambleID" value="<?php print $intGID;?>">
<input type="hidden" name="Bet_Type" value="">
<input type="hidden" name="isSpecial" value="1">
<input type="hidden" name="isStopBet" value="1">
<input type="hidden" name="isRealShow" value="1">
<input type="hidden" name="strLottoNumber" value="<?php print $_strNumber;?>">
<input type="hidden" name="ChangeGameType" value="No">
<input type="hidden" name="GameType" value="<?php print $_data["GameType"];?>">
<input type="hidden" name="SpecialNumType" value="1">
<input type="hidden" name="OtherMsg" value="">
</form>
</body>
</html>